package com.cloudlead.customerAction.action;

import com.cloudlead.common.lang.annotation.Label;
import com.cloudlead.common.worker.action.impl.AbstractActionFactory;
import com.cloudlead.common.worker.annotation.Action;
import com.cloudlead.common.worker.annotation.Order;
import com.cloudlead.customerAction.BusinessModules;
import com.cloudlead.customerAction.service.BookingSpaceReceiptFindSer;
import com.cloudlead.customerService.BookingSpaceReceiptFindService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * Created by wyj on 2015/9/5.
 */
@Controller
public class BookingSpaceReceiptFindActionFactory extends AbstractActionFactory implements BookingSpaceReceiptFindService {
    public BookingSpaceReceiptFindActionFactory() {
        super(BusinessModules.BookingSpaceReceiptFind);
    }


    @Autowired
    BookingSpaceReceiptFindSer bookingSpaceReceiptFindSer;

    @Override
    @Action
    @Order(1)
    @Label("订舱回执单值查询")
    public Object BookingSpaceReceiptFindOne(@NotNull @Label("订舱回执ID")String Id) {
        return bookingSpaceReceiptFindSer.BookingSpaceReceiptFindOne(Id);
    }

    @Override
    @Action
    @Order(2)
    @Label("订舱回执列表查询")
    public List<Object> BookingSpaceReceiptFindAll(@NotNull @Label("订舱单ID")String bookingSpaceOrderId) {
        return bookingSpaceReceiptFindSer.BookingSpaceReceiptFindAll(bookingSpaceOrderId);
    }
}
